<?php
$temp = 0;
foreach ($subject->result() as $res):
	$q = $this->db->query("select username from member where id_member='$res->author' limit 1");
	foreach ($q->result() as $re):
			$res->author = $re->username;
	endforeach;
?>
  <tr class="cursor-hover">
    <td align="left" class="font-size-16 capitalize" onclick="showSubject('<?php echo $res->id_subject?>')" width="95%">
    <?php echo $res->name?>
    <div class="font-size-10 font-color-gray untransform italic">type : <?php echo $res->format ?></div>
    <div class="font-size-10 font-color-gray untransform italic">posted by <?php echo $res->author ?></div>
    </td>
    <td class="font-size-16 bold">x</td>
  </tr>
  <tr>
   <td colspan="2"><hr size="1" width="98%" color="#cccccc" /></td>
  </tr>
<?php endforeach;?>